Output Devices

 

Assignment:

 

For this week my assignment is to make an output device to a micro controller board and program it to do something.

 

 

My output Devices:

 

My idea for my board is to have a an RGB LED in which it can have mulltiple color of output after program it. The concept derived from my final project in which I need different color are  for different result.

 

Tools needed:

 

1- Eagle Software

2- Cirquoid (milling machine) and Cirq Wizard

3- Soldering Equipments

4- Copper Boards

5- Electronic Components

 

The board that I used called “Board” from fabacademy.org website.

 

 

 
 

The “Board”

The Components needed are:

 

1- attitiny 45

2- two 1 k resistors

3- 10 k resistors

4- 499 ohm resistors

5- Capacitors 1uf

6- ISP

7- IC2 (in & out)

 

 

Making the board:

 

I used the eagle software as in week 8 for schematic and connecting the components together and find the optimum design of my board using the auto-router.

 

 

My design after using after using auto router

 

 

 

Then I convert my file to cmp for milling using the cam processor in eagle.

 

Schematic File AND Board File And CMP File

 

 

 

 

 

 

After testing and fining the right depth (Z-Axis)  as in week 8 I milled my board using  Cirquoid. After milling, I started soldering the components into the copperboard.

 

 

My design

 

 

 

 

Problem:

 

After programming,  I found that my LED only show one color and when  I looked at my in my schematic where I found a mistake in the VCC where the attitiny 45 is not connected where I forgot to label it using the label route. Another problem is that the RGB LED  was wrong while the board looks similar.

 

The solution to my problem is that I have to put the right RGB LED and label the VCC.

 

 

 

 

 

 

 

The Wrong schematic

 

 

CMP file

The wrong Board

 

 
 

The wrong Board after milling and soldering


Program:

iint redPin = 1;
int greenPin = 0;
int bluePin = 2;
#define COMMON_ANODE
void setup()
{
pinMode(redPin, OUTPUT);
pinMode(greenPin, OUTPUT);
pinMode(bluePin, OUTPUT);
}
void loop()
{
setColor(255, 0, 0);
delay(1000);
setColor(0, 255, 0);
delay(1000);
setColor(0, 0, 255);
delay(1000);
setColor(255, 255, 0);
delay(1000);
setColor(80, 0, 80);
delay(1000);
setColor(0, 255, 255);
delay(1000);
}
void setColor(int red, int green, int blue)
{
#ifdef COMMON_ANODE
red = 255 - red;
green = 255 - green;
blue = 255 - blue;
#endif
analogWrite(redPin, red);
analogWrite(greenPin, green);
analogWrite(bluePin, blue);

The Result: